define(["../maintools/Controller.js"], function (Controller) {
    Controller = Controller.Controller;
    var Trigger = Controller.create({
        elements: {},
        events: {
            "click li": "addFeature"
        },
        show: function () {
            this.el.removeClass("hide");
            this.el.css({
                top: "40px",
                opacity: "0"
            });
            this.el.animate({
                top: "51px",
                opacity: 1
            });
        },
        hide: function () {
            this.el.addClass("hide");
        },
        addFeature: function (e) {
            Message_bone.trigger("search", $(e.target).text());
            this.hide();
        },
        jrt: function () {
            var show = this.proxy(function (e, data) {
                this.show();
                this.render(data);
            });
            var hide = this.proxy(function (e) {
                this.hide();
            })
            Message_bone.on("suggestShow", show);
            Message_bone.on("suggestHide", hide);
            this.hide();
        },
        template: "#tsuggest"
    });
    var suggestTrigger = new Trigger("#suggest");
});
